<!-- 查询提醒人、群组modal -->
<div class="modal-dialog modal-lg">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" (click)="hideModal()">
        <span aria-hidden="true">&times;</span>
      </button>
      <h4 class="modal-title">接受提醒者列表</h4>
    </div>

    <div class="modal-body">

      <div class="row">
        <div class="col-xs-12">
          <div class="nav-tabs-custom">
            <ul class="nav nav-tabs" style="border-bottom-width: 0px;">
              <li class="active">
                <a href="#tab_user" data-toggle="tab">用户列表</a>
              </li>
              <li>
                <a href="#tab_group" data-toggle="tab">群组信息</a>
              </li>
            </ul>
            <div class="tab-content" style="padding:0;margin-top:10px">
              <div class="tab-pane active" id="tab_user">

                <form class="form-inline" style="margin-bottom:8px !important;">
                  <div class="box box-default">
                    <div class="box-body" style="display:block">

                      <div class="form-group" style="padding-left:5px !important; margin-bottom:8px">
                        <label class="control-label">用户名：</label>
                        <input type="text" class="form-control" placeholder="用户名" maxlength="2000" [(ngModel)]="getUserBody.sRealname" name="sRealname">
                        <label class="control-label">部门名：</label>
                        <input type="text" class="form-control" placeholder="用户/部门名" maxlength="2000" [(ngModel)]="getUserBody.sDeptname" name="sDeptname">
                        <label class="control-label">角色：</label>
                        <select class="form-control" style="max-height:150px !important;" [(ngModel)]="getUserBody.sRolename" name="sRolename">
                          <option [value]="''" selected="selected">全部</option>
                          <option [value]="item.nRoleid"  style="max-height:150px !important;" *ngFor="let item of roleList">{{item.sRolename}}</option>
                        </select>
                        <!-- <select class="form-control" [(ngModel)]="getUserBody.sRolename" name="sRolename" id="roleSelect" multiple></select> -->
                        
                        <button type="button" class="btn btn-primary" style="margin-left:10px;" (click)="userlist()">
                          <i class="fa fa-search"></i>查询</button>
                      </div>
                    </div>
                  </div>

                </form>
                <div class="box-body" style="padding-left:0px;padding-right:0px;">
                  <!-- <hr> -->
                  <div style="overflow-x:scroll;width:100%;overflow-y:scroll;height:350px;">
                    <table class="table table-bordered table-hover table-keep-line table-striped" style="margin-top:unset !important;">
                      <thead>
                        <tr>
                          <th class="width-5">
                            <div class="checkbox checkbox-primary">
                              <input type="checkbox" id="userCheckedAll" [(ngModel)]="userCheckedAll" (ngModelChange)="checkedAll(userList,userCheckedAll)">
                              <label></label>
                            </div>
                          </th>
                          <th class="width-15">所属部门</th>
                          <th class="width-20">用户名</th>
                          <th class="width-20">联系电话</th>
                          <th class="width-20">邮件地址</th>
                          <th class="width-20">角色名称</th>
                        </tr>
                      </thead>
                      <tbody style="overflow-y:scroll;">
                        <tr *ngFor="let item of userList;">
                          <td>
                            <div class="checkbox checkbox-primary">
                              <input type="checkbox" id="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll(userList,'userCheckedAll')">
                              <label>
                              </label>
                            </div>
                          </td>
                          <td class="short_name" [attr.title]="item.sDeptname">{{item.sDeptname}}</td>
                          <td class="short_name" [attr.title]="item.sRealname">{{item.sRealname}}</td>
                          <td class="short_name" [attr.title]="item.sMobile">{{item.sMobile}}</td>
                          <td class="short_name" [attr.title]="item.sEmail">{{item.sEmail}}</td>
                          <td class="short_name" [attr.title]="item.sRolename">{{item.sRolename}}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
              <!-- /.tab-pane -->
              <div class="tab-pane" id="tab_group">
                <div class="box-body" style="padding-left:0px;padding-right:0px;">
                  <!-- <hr> -->
                  <div style="overflow-x:scroll;width:100%;overflow-y:scroll;height:350px;">
                    <table class="table table-bordered table-hover table-keep-line table-striped" style="margin-top:unset !important;">
                      <thead>
                        <tr>
                          <th class="width-5">
                            <div class="checkbox checkbox-primary">
                              <input type="checkbox" id="userCheckedAll" [(ngModel)]="groupCheckedAll" (ngModelChange)="checkedAll(groupList,groupCheckedAll)">
                              <label></label>
                            </div>
                          </th>
                          <th class="width-20">群组名称</th>
                          <th class="width-25">群组描述</th>
                          <th class="width-25">创建人</th>
                          <th class="width-25">是否共享</th>
                        </tr>
                      </thead>
                      <tbody style="overflow-y:scroll;">
                        <tr *ngFor="let item of groupList;">
                          <td>
                            <div class="checkbox checkbox-primary">
                              <input type="checkbox" id="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll(groupList,'groupCheckedAll')">
                              <label>
                              </label>
                            </div>
                          </td>
                          <td class="short_name" [attr.title]="item.sGroupName">{{item.sGroupName}}</td>
                          <td class="short_name" [attr.title]="item.sGroupDesc">{{item.sGroupDesc}}</td>
                          <td class="short_name" [attr.title]="item.sCreator">{{item.sCreator}}</td>
                          <td class="short_name">
                            <span *ngIf="item.sShareFlag==1">是</span>
                            <span *ngIf="item.sShareFlag==0">否</span>
                          </td>

                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
              <!-- /.tab-pane -->
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="modal-footer">
      <button (click)="hideModal()" type="button" class="btn btn-default pull-left">关闭</button>
      <button (click)="saveData()"type="button" class="btn btn-primary pull-right">保存</button>
      <!-- <button type="button" class="btn btn-primary" (click)="saveEntry()">
          <i class="fa fa-save"></i>保存</button> -->
    </div>
  </div>
</div>